package com.cfuture08.eweb4j.orm.dao.config.bean;

import com.cfuture08.util.xml.tag.XmlTag;
import com.cfuture08.util.xml.tag.XmlTagType;
/**
 * DAO组件用来存取配置信息 的bean
 * @author cfuture.aw
 * @since v1.a.0
 */
public class DAOConfigBean {

	@XmlTag(type = XmlTagType.attriType, value = "dbInfo", canWrite = true, canRead = true)
	private String name;
	@XmlTag(type = XmlTagType.attriType, value = "com.cfuture08.eweb4j.orm.dao.config.bean.DAOConfigBean", canWrite = true, canRead = true)
	private String xmlBean;
	/**
	 * 数据库类型
	 */
	private String dataBaseType;
	/**
	 * 当使用JNDI数据源时，配置JNDI数据源名称
	 */
	private String jndiName;
	/**
	 * 数据源工具类
	 */
	private String jdbcUtil = "";
	/**
	 * 数据库驱动
	 */
	private String driverClass = "com.mysql.jdbc.Driver";
	/**
	 * 数据库连接地址
	 */
	private String jdbcUrl = "jdbc:mysql://localhost:3306/test";
	/**
	 * 数据库连接用户名
	 */
	private String user = "root";
	/**
	 * 数据库连接密码
	 */
	private String password = "root";
	/**
	 * 初始化时获取三个连接，取值应在minPoolSize与maxPoolSize之间。Default: 3 initialPoolSize
	 */
	private String initialPoolSize = "3";
	/**
	 * 连接池中保留的最大连接数。Default: 15 maxPoolSize
	 */
	private String maxPoolSize = "50";
	/**
	 * 连接池中保留的最小连接数。
	 * 
	 */
	private String minPoolSize = "1";
	/**
	 * 当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3 acquireIncrement
	 */
	private String acquireIncrement = "3";
	/**
	 * 每多少秒检查所有连接池中的空闲连接。Default: 0 idleConnectionTestPeriod
	 */
	private String idleConnectionTestPeriod = "60";
	/**
	 * 最大空闲时间,25000秒内未使用则连接被丢弃。若为0则永不丢弃。Default: 0 maxIdleTime
	 */
	private String maxIdleTime = "25000";
	/**
	 * 连接关闭时默认将所有未提交的操作回滚。Default: false autoCommitOnClose
	 */
	private String autoCommitOnClose = "true";
	/**
	 * 定义所有连接测试都执行的测试语句。在使用连接测试的情况下这个一显著提高测试速度。注意：
	 * 测试的表必须在初始数据源的时候就存在。Default: null preferredTestQuery
	 */
	private String preferredTestQuery = "";
	/**
	 * 因性能消耗大请只在需要的时候使用它。如果设为true那么在每个connection提交的
	 * 时候都将校验其有效性。建议使用idleConnectionTestPeriod或automaticTestTable
	 * 等方法来提升连接测试的性能。Default: false testConnectionOnCheckout
	 */
	private String testConnectionOnCheckout = "false";
	/**
	 * 如果设为true那么在取得连接的同时将校验连接的有效性。Default: false testConnectionOnCheckin
	 */
	private String testConnectionOnCheckin = "false";
	/**
	 * 定义在从数据库获取新连接失败后重复尝试的次数。Default: 30 acquireRetryAttempts
	 */
	private String acquireRetryAttempts = "30";
	/**
	 * 两次连接中间隔时间，单位毫秒。Default: 1000 acquireRetryDelay
	 */
	private String acquireRetryDelay = "1000";
	/**
	 * 获取连接失败将会引起所有等待连接池来获取连接的线程抛出异常。但是数据源仍有效
	 * 保留，并在下次调用getConnection()的时候继续尝试获取连接。如果设为true，那么在尝试
	 * 获取连接失败后该数据源将申明已断开并永久关闭。Default: false breakAfterAcquireFailure
	 */
	private String breakAfterAcquireFailure = "false";
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getXmlBean() {
		return xmlBean;
	}
	public void setXmlBean(String xmlBean) {
		this.xmlBean = xmlBean;
	}
	public String getDataBaseType() {
		return dataBaseType;
	}
	public void setDataBaseType(String dataBaseType) {
		this.dataBaseType = dataBaseType;
	}
	public String getJndiName() {
		return jndiName;
	}
	public void setJndiName(String jndiName) {
		this.jndiName = jndiName;
	}
	public String getJdbcUtil() {
		return jdbcUtil;
	}
	public void setJdbcUtil(String jdbcUtil) {
		this.jdbcUtil = jdbcUtil;
	}
	public String getDriverClass() {
		return driverClass;
	}
	public void setDriverClass(String driverClass) {
		this.driverClass = driverClass;
	}
	public String getJdbcUrl() {
		return jdbcUrl;
	}
	public void setJdbcUrl(String jdbcUrl) {
		this.jdbcUrl = jdbcUrl;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getInitialPoolSize() {
		return initialPoolSize;
	}
	public void setInitialPoolSize(String initialPoolSize) {
		this.initialPoolSize = initialPoolSize;
	}
	public String getMaxPoolSize() {
		return maxPoolSize;
	}
	public void setMaxPoolSize(String maxPoolSize) {
		this.maxPoolSize = maxPoolSize;
	}
	public String getMinPoolSize() {
		return minPoolSize;
	}
	public void setMinPoolSize(String minPoolSize) {
		this.minPoolSize = minPoolSize;
	}
	public String getAcquireIncrement() {
		return acquireIncrement;
	}
	public void setAcquireIncrement(String acquireIncrement) {
		this.acquireIncrement = acquireIncrement;
	}
	public String getIdleConnectionTestPeriod() {
		return idleConnectionTestPeriod;
	}
	public void setIdleConnectionTestPeriod(String idleConnectionTestPeriod) {
		this.idleConnectionTestPeriod = idleConnectionTestPeriod;
	}
	public String getMaxIdleTime() {
		return maxIdleTime;
	}
	public void setMaxIdleTime(String maxIdleTime) {
		this.maxIdleTime = maxIdleTime;
	}
	public String getAutoCommitOnClose() {
		return autoCommitOnClose;
	}
	public void setAutoCommitOnClose(String autoCommitOnClose) {
		this.autoCommitOnClose = autoCommitOnClose;
	}
	public String getPreferredTestQuery() {
		return preferredTestQuery;
	}
	public void setPreferredTestQuery(String preferredTestQuery) {
		this.preferredTestQuery = preferredTestQuery;
	}
	public String getTestConnectionOnCheckout() {
		return testConnectionOnCheckout;
	}
	public void setTestConnectionOnCheckout(String testConnectionOnCheckout) {
		this.testConnectionOnCheckout = testConnectionOnCheckout;
	}
	public String getTestConnectionOnCheckin() {
		return testConnectionOnCheckin;
	}
	public void setTestConnectionOnCheckin(String testConnectionOnCheckin) {
		this.testConnectionOnCheckin = testConnectionOnCheckin;
	}
	public String getAcquireRetryAttempts() {
		return acquireRetryAttempts;
	}
	public void setAcquireRetryAttempts(String acquireRetryAttempts) {
		this.acquireRetryAttempts = acquireRetryAttempts;
	}
	public String getAcquireRetryDelay() {
		return acquireRetryDelay;
	}
	public void setAcquireRetryDelay(String acquireRetryDelay) {
		this.acquireRetryDelay = acquireRetryDelay;
	}
	public String getBreakAfterAcquireFailure() {
		return breakAfterAcquireFailure;
	}
	public void setBreakAfterAcquireFailure(String breakAfterAcquireFailure) {
		this.breakAfterAcquireFailure = breakAfterAcquireFailure;
	}
}
